import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/store";
import request from "./utils/request";
import '@/assets/css/common.scss';
import '@/assets/css/reset.css';
import '@/assets/icon/iconfont.css'
//import '@/assets/js/amfe-flexible.js'
import 'amfe-flexible'
// import '@/assets/js/zepto.min.js'
//import ElementUI from 'element-ui';
//import 'element-ui/lib/theme-chalk/index.css';
import '@/utils/dayjs'

import { Button, Checkbox, Form, Field, Dialog, Icon, Toast, RadioGroup, Radio, Cell, CellGroup, Popup, ActionSheet, DatetimePicker, Area, Uploader, Image as VanImage, Lazyload, Swipe, SwipeItem, DropdownMenu, DropdownItem, NavBar, Tag, Col, Row } from 'vant';

Vue.config.productionTip = false;
Vue.use(request);
//Vue.use(ElementUI);
Vue.use(Button);
Vue.use(Checkbox);
Vue.use(Form);
Vue.use(Field);
Vue.use(Dialog);
Vue.use(Icon);
Vue.use(Toast);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Popup);
Vue.use(ActionSheet);
Vue.use(DatetimePicker);
Vue.use(Area);
Vue.use(Uploader);
Vue.use(VanImage);
Vue.use(Lazyload);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(NavBar);
Vue.use(Tag);
Vue.use(Col);
Vue.use(Row);

var vm = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

router.afterEach((to, from) => {
  vm.$el.scrollTop = 0;
});